﻿@{
    ViewBag.Title = "ChucNang";
    Layout = "~/Views/Shared/Admin/_AdminLayout.cshtml";
}

@using PagedList
@using PagedList.Mvc
<div id="content" class="span10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a> <span class="divider">/</span>
            </li>
            <li>
                <a href="#">Danh sách user</a>
            </li>
        </ul>
    </div>
    <div class="row-fluid sortable">
        <div class="box span12">
            <div class="box-content">
                <div class="row-fluid">
                    <div class="span12 form-inline">
                        @using (Html.BeginForm("DanhSach", "AdminSanPham", FormMethod.Get))
                        {
                            <div id="search-box" style="text-align: left">
                                Tên khách hàng
                                <input type="text" name="SearchString" class="input" value="@ViewBag.CurrentFilter" placeholder="Tên khách hàng..."/>
                                <button class="btn btn-small" type="submit"><i class="icon-search"></i>Tìm kiếm</button>
                            </div>
                        }
                    </div>

                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <a href="~/AdminUser/ThemUser" class="btn btn-large btn-success">
                            <i class="icon-plus icon-white"></i>
                            Thêm mới
                        </a>
                    </div>
                </div>

            </div>
            <div class="clearfix"></div>
            <table class="table table-striped table-bordered bootstrap-datatable datatable">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Tên</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var phanquyen in ViewBag.OnePage)
                    {
                        <tr class="item_row" style="border-color: #F0F0F0; border-style: Solid; height: 40px;">
                            <td class="item_float">
                                <label>
                                    <input type="checkbox" name="deleteInputs" value="@phanquyen.IdQuyen" />
                                    <span class="lbl"></span>
                                </label>
                            </td>
                            <td class="item_float">
                                <label>
                                    @phanquyen.IdQuyen
                                </label>
                            </td>
                            <td class="item_float">
                                <label>
                                    @phanquyen.TenQuyen
                                </label>
                            </td>
                            <td class="item_float">
                                <div class="hidden-phone visible-desktop action-buttons">
                                    <a href="~/AdminUser/SuaPhanQuyen/@phanquyen.IdQuyen" class="btn btn-info">
                                        <i class="icon-edit icon-white"></i>
                                        Sửa
                                    </a>
                                </div>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
            <div class="pagination pagination-centered">
                @Html.PagedListPager((IPagedList)ViewBag.OnePage, page => Url.Action("PhanQuyen", new { page }), PagedListRenderOptions.OnlyShowFivePagesAtATime)
            </div>

        </div>
    </div>
</div>



